<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<div class="box no-border">

	<isperp:grid url="project/service/listDetail?projectId=${projectId }"
		cusViewUrl="serviceCatalog/service/view"
		ondbClickRowEvent="serviceGridOndbClick(rowid)" gridId="serviceGrid"
		cusFormatterActions="false">
		<jsp:attribute name="searchbar">
		<table class="search-table">
			<tbody>
				<tr>
					<td align="right">编号：</td>
					<td><input type="text" field="code" op="cn">
						</td>
					<td align="right">名称：</td>
					<td><input type="text" field="name" op="cn">
						</td>
				</tr>
				<tr>
					<td align="right">状态：</td>
					<td><input type="text" field="status" op="cn">
						</td>
					<td align="right">关键字：</td>
					<td colspan="3"><input type="text" field="keyword" op="cn">
					</td>

				</tr>
			</tbody>
		</table>
		</jsp:attribute>
		<jsp:body>
		<isperp:column name="id" title="id" hidden="true"></isperp:column>
		<isperp:column name="code" title="编号" width="70">
		</isperp:column>
		<isperp:column name="name" title="名称" width="80"></isperp:column>
		<isperp:column name="category_name" title="分类" width="80">
		</isperp:column>
		<isperp:column name="keyword" title="关键字" width="150">
		</isperp:column>
		</jsp:body>
	</isperp:grid>
</div>

<script type="text/javascript">
	function formatSrcName(rowObject) {
		return "<a href=\"javascript:isperp.openDialog({contentUrl:'serviceCatalog/service/view?id=" + rowObject.id + "'});\">" + rowObject.name + "</a>";
	}

	function serviceGridOndbClick(rowid) {
		if (window.parent.setServiceCatalogValue) {
			var rowData = serviceGrid.getRowData();
			window.parent.setServiceCatalogValue(rowData.id, rowData.name);
		}
	}

	function getSelectRow() {
		var rowData = serviceGrid.getRowData();
		if (rowData)
			window.parent.setServiceCatalogValue(rowData.id, rowData.name);
		else {
			alert("请选择一条服务目录");
		}
	}
</script>

